<template>
  <div class="user">
    <div class="find">
      <el-input placeholder="请输入内容"></el-input>
      <el-button size="small">查找</el-button>
      <el-button type="button"  @click="dialogTableVisible = true"  size="small">增加</el-button>
      <el-button size="small">删除</el-button>
    </div>
    <el-dialog title="添加主题词" :visible.sync="dialogTableVisible">
      <el-form :model="form">
        <el-form-item label="登录名" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="用户类型" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="姓名" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="电话" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="邮箱" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogTableVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
      </div>
    </el-dialog>
    <el-table
      :data="rows"
      style="width: 100%">
      <el-table-column
        prop="login_name"
        label="登录名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="user_type"
        label="用户类型"
        width="100">
      </el-table-column>
      <el-table-column
        prop="create_time"
        label="创建时间"
        width="250">
      </el-table-column>
      <el-table-column
        prop="user_name"
        label="姓名">
      </el-table-column>
      <el-table-column
        prop="tel"
        label="电话">
      </el-table-column>
      <el-table-column
        prop="id"
        label="id"
        width="80">
      </el-table-column>
      <el-table-column
        prop="email"
        label="邮箱">
      </el-table-column>
      <el-table-column
        label="操作">
        <template scope="scope">
          <el-button type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        dialogTableVisible: false,
        dialogFormVisible: false,
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        },
        formLabelWidth: '150px',
        "total": 10,
        "page": 0,
        "rows": [
          {
            "login_name": "123123123",
            "user_type": 1,
            "create_time": "2017-07-21 16:19:41",
            "user_name": "12312",
            "tel": "123132",
            "id": 1,
            "email": "12312"
          },
          {
            "login_name": "132131123",
            "user_type": 1,
            "create_time": "2017-07-21 16:19:52",
            "user_name": "21",
            "tel": "12312",
            "id": 2,
            "email": "12"
          },
          {
            "login_name": "123123121233",
            "user_type": 3,
            "create_time": "2017-07-21 16:32:07",
            "user_name": "12312",
            "tel": "12312",
            "id": 3,
            "email": "123"
          },
          {
            "login_name": "11333333333333333",
            "user_type": 1,
            "create_time": "2017-07-21 16:32:24",
            "user_name": "11",
            "tel": "11",
            "id": 5,
            "email": ""
          },
          {
            "login_name": "121412412",
            "user_type": 3,
            "create_time": "2017-07-21 16:32:36",
            "user_name": "31",
            "tel": "1",
            "id": 6,
            "email": "312"
          },
          {
            "login_name": "435432534",
            "user_type": 1,
            "create_time": "2017-07-21 16:32:44",
            "user_name": "3453",
            "tel": "34534",
            "id": 7,
            "email": "34534"
          },
          {
            "login_name": "42323412",
            "user_type": 1,
            "create_time": "2017-07-21 16:32:51",
            "user_name": "23423",
            "tel": "12312",
            "id": 8,
            "email": "131"
          },
          {
            "login_name": "453451231",
            "user_type": 1,
            "create_time": "2017-07-21 16:33:00",
            "user_name": "34534",
            "tel": "1231",
            "id": 9,
            "email": "12312"
          },
          {
            "login_name": "1235555555555",
            "user_type": 2,
            "create_time": "2017-07-21 17:56:03",
            "user_name": "123",
            "tel": "123",
            "id": 10,
            "email": "123"
          },
          {
            "login_name": "12312312312312",
            "user_type": 2,
            "create_time": "2017-07-24 13:12:16",
            "user_name": "12312312",
            "tel": "1231",
            "id": 11,
            "email": "123"
          }
        ]
      }
    }
  }
</script>
<style>
  .user{
    margin-left: 10px;
    margin-top: 10px;
  }
  .user th{
    text-align: center;
  }
  .user .el-input{
    width:80%;
    float: left;
  }
  .user .el-dialog{
    width:40%;
  }
</style>
